package com.ccb.sc.common.modules.order.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ccb.sc.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * <p>
 * 订单项
 * </p>
 *
 * @author ken
 * @since 2020-09-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_order_item")
public class OrderItem extends BaseEntity {

    private static final long serialVersionUID=1L;

    /**
     * 订单id
     */
    @TableField("order_id")
    private String orderId;

    /**
     * 商品id
     */
    @TableField("goods_id")
    private Long goodsId;

    /**
     * 商品名称
     */
    @TableField("goods_name")
    private String goodsName;

    /**
     * 产品编码
     */
    @TableField("spu")
    private String spu;

    /**
     * 商品规格id
     */
    @TableField("goods_spec_id")
    private Long goodsSpecId;

    /**
     * 商品规格
     */
    @TableField("goods_spec")
    private String goodsSpec;

    /**
     * 规格编码
     */
    @TableField("sku")
    private String sku;

    /**
     * 规格图片
     */
    @TableField("picture")
    private String picture;

    /**
     * 成本价格
     */
    @TableField("cost_price")
    private BigDecimal costPrice;

    /**
     * 运费
     */
    @TableField("freight")
    private BigDecimal freight;

    /**
     * 单价
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 兑换积分
     */
    @TableField("exchange_points")
    private BigDecimal exchangePoints;

    /**
     * 数量
     */
    @TableField("quantity")
    private Integer quantity;

    /**
     * 退货数量
     */
    @TableField("return_quantity")
    private Integer returnQuantity;

}
